import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';

class AddFriendPage extends StatefulWidget {
  @override
  _AddFriendPageState createState() => _AddFriendPageState();
}

class _AddFriendPageState extends State<AddFriendPage> {
  @override
  Widget build(BuildContext context) {
    showCupertinoDialog(
        context: context,
        builder: (context) {
          return new CupertinoAlertDialog(
            title: new Text("title"),
            content: new Text("内容内容内容内容内容内容内容内容内容内容内容"),
            actions: <Widget>[
              new FlatButton(
                onPressed: () {
                  Navigator.of(context).pop("点击了确定");
                },
                child: new Text("确认"),
              ),
              new FlatButton(
                onPressed: () {
                  Navigator.of(context).pop("点击了取消");
                },
                child: new Text("取消"),
              ),
            ],
          );
        });
    void showMyCupertinoDialog(BuildContext context) {
      showCupertinoDialog(
          context: context,
          builder: (context) {
            return new CupertinoAlertDialog(
              title: new Text("title"),
              content: new Text("内容内容内容内容内容内容内容内容内容内容内容"),
              actions: <Widget>[
                new FlatButton(
                  onPressed: () {
                    Navigator.of(context).pop("点击了确定");
                  },
                  child: new Text("确认"),
                ),
                new FlatButton(
                  onPressed: () {
                    Navigator.of(context).pop("点击了取消");
                  },
                  child: new Text("取消"),
                ),
              ],
            );
          });
    }
  }
}
